<?php

Route::group(['prefix' => 'com'], function () {//企业用户登录
    Route::match(['post'], 'register', 'LoginController@comRegister');//企业注册
    Route::match(['post'], 'smscode', 'LoginController@ComSmsCode');//获取手机验证码
    Route::match(['post'], 'login', 'LoginController@companyUserLogin');//企业登录
    Route::match(['post'], 'password_reset', 'ComUserController@pwdReset')->middleware('auth:com');//密码修改

    Route::match(['post'], 'wxlogin', 'LoginController@comUserSaveWxOpenId');//微信登录
    Route::match(['post'], 'qqlogin', 'LoginController@comUserSaveQqOpenId');//qq登录

    Route::match(['post'], 'commend', 'ComUserController@commend')->middleware('auth:com');//推荐简历
    Route::match(['post'], 'near_resume', 'ComUserController@nearResume')->middleware('auth:com');//附近简历

    Route::match(['post'], 'browse/job', 'ComUserController@browseJob')->middleware('auth:com');//职位被浏览记录
    Route::match(['post'], 'browse/company', 'ComUserController@browseCompany')->middleware('auth:com');//公司被浏览记录

    Route::match(['post'], 'browse/resume', 'ComUserController@browseResume')->middleware('auth:com');//浏览简历记录
    Route::match(['post'], 'buy_resume', 'ComUserController@buyResume')->middleware('auth:com');//购买简历记录

    Route::match(['post', 'get'], 'check_version', 'ComUserController@checkVersion');//检查版本更新
    Route::match(['post'], 'check_com_red_packet', 'ActivityController@checkComRedPacketActivity')->middleware('auth:com');//检查红包分享状态
    Route::match(['post'], 'add_com_red_packet_record', 'ActivityController@addComRedPacketActivityRecord')->middleware('auth:com');//添加红包分享记录

    Route::match(['post'], 'apppay_check', 'ComUserController@checkAppPay')->middleware('auth:com');//验证apple支付
    Route::match(['post'], 'vip_package', 'ComUserController@vipPackage')->middleware('auth:com');//套餐列表
});

Route::group(['prefix' => 'user'], function () {//普通用户登录
    Route::match(['post'], 'register', 'LoginController@userRegister');//用户注册
    Route::match(['post'], 'login', 'LoginController@userLogin');//用户登录
    Route::match(['post'], 'smscode', 'LoginController@UserSmsCode');//获取手机验证码
    Route::match(['post'], 'password_reset', 'UserController@pwdReset')->middleware('auth:api');//密码修改
    Route::match(['post'], 'user_login_smscode', 'LoginController@userLoginSmsCode');//获取手机登录验证码

    Route::match(['post'], 'wxlogin', 'LoginController@userSaveWxOpenId');//微信登录
    Route::match(['post'], 'qqlogin', 'LoginController@userSaveQqOpenId');//qq登录

    Route::match(['post'], 'index', 'UserController@userIndex');//客户端首页

    Route::match(['post'], 'commend', 'UserController@commend');//推荐职位
    Route::match(['post'], 'near_job', 'UserController@nearJob');//附近岗位

    Route::match(['post'], 'browse', 'UserController@browseResume')->middleware('auth:api');//简历被浏览记录

    Route::match(['post'], 'browse/job', 'UserController@browseJob')->middleware('auth:api');//浏览职位记录
    Route::match(['post'], 'browse/com', 'UserController@browseCom')->middleware('auth:api');//浏览公司记录

    Route::match(['post'], 'resume_info', 'UserController@resumeInfo')->middleware('auth:api');//浏览公司记录

    Route::match(['post', 'get'], 'check_version', 'UserController@checkVersion');//检查版本更新

    Route::match(['post'], 'mob_login', 'LoginController@userMobLogin');//微信小程序手机号+验证码登录
    Route::match(['post'], 'mob_register', 'LoginController@userMobRegister');//微信小程序手机号+验证码注册

    Route::match(['post'], 'get_user_info', 'LoginController@getUserInfo');//token读取用户信息
});

Route::match(['post'], 'register_chat', 'LoginController@registerForChat');//注册聊天账号

Route::match(['post'], 'wxlogin', 'LoginController@wxToken');//修改微信登录

Route::match(['post'], 'area', 'OptionController@getArea');//获取地区
Route::match(['post'], 'area/all', 'OptionController@allArea');//获取所有地区
Route::match(['post'], 'webareacode', 'OptionController@webAreaCode');//地区快选

Route::match(['post'], 'position', 'OptionController@getPosition');//获取职位
Route::match(['post'], 'position/all', 'OptionController@allPosition');//获取所有职位

Route::match(['post'], 'comkind', 'OptionController@comkind');//获取公司性质
Route::match(['post'], 'employee_num', 'OptionController@employeeNum');//获取公司规模
Route::match(['post'], 'industry', 'OptionController@industry');//获取行业列表
Route::match(['post'], 'salary', 'OptionController@salary');//获取薪资列表
Route::match(['post'], 'education', 'OptionController@education');//获取学历列表
Route::match(['post'], 'language', 'OptionController@language');//获取语言列表
Route::match(['post'], 'work_year', 'OptionController@workYear');//获取经验列表
Route::match(['post'], 'title', 'OptionController@title');//获取标题列表
Route::match(['post'], 'speciality', 'OptionController@speciality');//获取专业列表
Route::match(['post'], 'age_stint', 'OptionController@ageStint');//获取年龄列表
Route::match(['post'], 'option/second', 'OptionController@second');//获取语言二级列表
Route::match(['post'], 'release_date', 'OptionController@releaseDate');//获取时间限制列表
Route::match(['post'], 'part_time_type', 'OptionController@partTimeType');//获取时间限制列表

Route::group(['prefix' => 'company_job'], function () {//公司职位相关
    Route::match(['post'], '', 'CompanyJobController@index')->middleware('auth:com');//企业用户查看公司所有岗位
    Route::match(['post'], 'per_list', 'CompanyJobController@perIndex');//求职者查看公司所有岗位
    Route::match(['post'], 'create', 'CompanyJobController@create')->middleware('auth:com');//公司添加岗位
    Route::match(['post'], 'show', 'CompanyJobController@show');//获取职位信息详情
    Route::match(['post'], 'edit', 'CompanyJobController@edit')->middleware('auth:com');//获取修改职位信息
    Route::match(['post'], 'update', 'CompanyJobController@update')->middleware('auth:com');//修改职位信息

    Route::match(['post'], 'search', 'CompanyJobController@search');//查找所有岗位
    Route::match(['post'], 'search_job_hot_word', 'CompanyJobController@searchJobHotWord');//搜索热门关键字
    Route::match(['post'], 'search_com_hot_word', 'CompanyJobController@searchComHotWord');//搜索热门关键字

    Route::match(['post'], 'updatetime', 'CompanyJobController@updateTime')->middleware('auth:com');//更新岗位的发布时间
    Route::match(['post'], 'status', 'CompanyJobController@updateStatus')->middleware('auth:com');//更新岗位状态
    Route::match(['post'], 'urgent', 'CompanyJobController@urgent')->middleware('auth:com');//加急

    Route::match(['post'], 'get_contact', 'CompanyJobController@getContact');//获取联系方式
});

Route::group(['prefix' => 'company_department'], function () {//公司部门相关
    Route::match(['post'], '', 'CompanyDepartmentController@index')->middleware('auth:com');//查找公司所有部门
    Route::match(['post'], 'create', 'CompanyDepartmentController@create')->middleware('auth:com');//添加部门
    Route::match(['post'], 'edit', 'CompanyDepartmentController@edit')->middleware('auth:com');//获取修改部门信息
    Route::match(['post'], 'update', 'CompanyDepartmentController@update')->middleware('auth:com');//修改部门
    Route::match(['post'], 'delete', 'CompanyDepartmentController@destroy')->middleware('auth:com');//删除部门
});

Route::group(['prefix' => 'company_basic'], function () {//公司相关
    Route::match(['post'], 'create', 'CompanyBasicController@create')->middleware('auth:com');//基本信息添加
    Route::match(['post'], 'show', 'CompanyBasicController@show');//获取公司信息详情

    Route::match(['post'], 'logo', 'CompanyBasicController@uploadLogo')->middleware('auth:com');//更新logo
});

Route::group(['prefix' => 'company_basic/info'], function () {//公司基本信息相关
    Route::match(['post'], 'edit', 'CompanyBasicController@infoEdit')->middleware('auth:com');//基本信息修改
    Route::match(['post'], 'update', 'CompanyBasicController@infoUpdate')->middleware('auth:com');//更新基本信息
});

Route::group(['prefix' => 'company_basic/conn'], function () {//公司联系方式相关
    Route::match(['post'], 'edit', 'CompanyBasicController@connEdit')->middleware('auth:com');//联系方式修改
    Route::match(['post'], 'update', 'CompanyBasicController@connUpdate')->middleware('auth:com');//更新联系方式
});

Route::group(['prefix' => 'company_basic/temptation'], function () {//公司福利相关
    Route::match(['post'], 'edit', 'CompanyBasicController@temptationEdit')->middleware('auth:com');//福利修改
    Route::match(['post'], 'update', 'CompanyBasicController@temptationUpdate')->middleware('auth:com');//更新福利
});

Route::group(['prefix' => 'company_basic/company_photo'], function () {//公司相册相关
    Route::match(['post'], '', 'CompanyPhotoController@index')->middleware('auth:com');//公司所有图片
    Route::match(['post'], 'create', 'CompanyPhotoController@create')->middleware('auth:com');//上传图片
    Route::match(['post'], 'delete', 'CompanyPhotoController@destroy')->middleware('auth:com');//删除图片
});

Route::group(['prefix' => 'company_basic/company_certification'], function () {//企业认证相关
    Route::match(['post'], 'create', 'CompanyCertificationController@create')->middleware('auth:com');//创建
    Route::match(['post'], 'edit', 'CompanyCertificationController@edit')->middleware('auth:com');//编辑
    Route::match(['post'], 'update', 'CompanyCertificationController@update')->middleware('auth:com');//修改
});

Route::group(['prefix' => 'resume'], function () {//简历
    Route::match(['post'], 'show', 'ResumeController@show');//获取简历信息详情
    Route::match(['post'], 'search', 'ResumeController@search')->middleware('auth:com');//查找所有简历

    Route::match(['post'], 'status', 'ResumeController@updateStatus')->middleware('auth:api');//更新简历状态
    Route::match(['post'], 'contact', 'ResumeController@contact')->middleware('auth:com');//获取简历联系方式(购买简历)

    Route::match(['post'], 'avatar', 'ResumeController@uploadAvatar')->middleware('auth:api');//更新头像
    Route::match(['post'], 'chkphoto_open', 'ResumeController@chkphotoOpen')->middleware('auth:api');//是否简历中隐藏照片


    Route::match(['post'], 'refresh', 'ResumeController@resumeRefresh')->middleware('auth:api');//刷新简历
    Route::match(['post'], 'need_refresh', 'ResumeController@needRefresh')->middleware('auth:api');//是否需要刷新简历
    Route::match(['post'], 'refresh_info', 'ResumeController@resumeRefreshInfo')->middleware('auth:api');//刷新简历升级版
});

Route::group(['prefix' => 'resume_info'], function () {//简历基本信息
    Route::match(['post'], 'create', 'ResumeController@infoCreate')->middleware('auth:api');//添加简历基本信息
});

Route::group(['prefix' => 'resume_data'], function () {//简历基本资料
    Route::match(['post'], 'edit', 'ResumeController@dataEdit')->middleware('auth:api');//修改简历基本资料
    Route::match(['post'], 'update', 'ResumeController@dataUpdate')->middleware('auth:api');//修改简历基本资料
});

Route::group(['prefix' => 'resume_conn'], function () {//简历联系方式
    Route::match(['post'], 'update', 'ResumeController@connUpdate')->middleware('auth:api');//修改简历联系方式
});

Route::group(['prefix' => 'resume_intent'], function () {//简历意向
    Route::match(['post'], 'edit', 'ResumeController@intentEdit')->middleware('auth:api');//添加简历意向
    Route::match(['post'], 'update', 'ResumeController@intentUpdate')->middleware('auth:api');//修改简历意向
});

Route::group(['prefix' => 'resume_intro'], function () {//简历介绍
    Route::match(['post'], 'update', 'ResumeController@introUpdate')->middleware('auth:api');//修改简历介绍
});

Route::group(['prefix' => 'resume_workexp'], function () {//简历工作经验相关
    Route::match(['post'], 'create', 'ResumeWorkExpController@create')->middleware('auth:api');//添加工作经验
    Route::match(['post'], 'edit', 'ResumeWorkExpController@edit')->middleware('auth:api');//获取修改工作经验
    Route::match(['post'], 'update', 'ResumeWorkExpController@update')->middleware('auth:api');//修改工作经验
    Route::match(['post'], 'delete', 'ResumeWorkExpController@destroy')->middleware('auth:api');//删除工作经验
});

Route::group(['prefix' => 'resume_eduexp'], function () {//简历学历经验相关
    Route::match(['post'], 'create', 'ResumeEducationExpController@create')->middleware('auth:api');//添加学历经验
    Route::match(['post'], 'edit', 'ResumeEducationExpController@edit')->middleware('auth:api');//获取修改学历经验
    Route::match(['post'], 'update', 'ResumeEducationExpController@update')->middleware('auth:api');//修改学历经验
    Route::match(['post'], 'delete', 'ResumeEducationExpController@destroy')->middleware('auth:api');//删除学历经验
});

Route::group(['prefix' => 'resume_proexp'], function () {//简历项目经验相关
    Route::match(['post'], 'create', 'ResumeProjectExpController@create')->middleware('auth:api');//添加项目经验
    Route::match(['post'], 'edit', 'ResumeProjectExpController@edit')->middleware('auth:api');//获取修改项目经验
    Route::match(['post'], 'update', 'ResumeProjectExpController@update')->middleware('auth:api');//修改项目经验
    Route::match(['post'], 'delete', 'ResumeProjectExpController@destroy')->middleware('auth:api');//删除项目经验
});

Route::group(['prefix' => 'resume_lang'], function () {//简历语言相关
    Route::match(['post'], 'create', 'ResumeLanguageSkillController@create')->middleware('auth:api');//添加简历语言
    Route::match(['post'], 'edit', 'ResumeLanguageSkillController@edit')->middleware('auth:api');//获取修改简历语言
    Route::match(['post'], 'update', 'ResumeLanguageSkillController@update')->middleware('auth:api');//修改简历语言
    Route::match(['post'], 'delete', 'ResumeLanguageSkillController@destroy')->middleware('auth:api');//删除简历语言
});

Route::group(['prefix' => 'resume_skill'], function () {//简历技能相关
    Route::match(['post'], 'create', 'ResumeSkillController@create')->middleware('auth:api');//添加简历技能
    Route::match(['post'], 'edit', 'ResumeSkillController@edit')->middleware('auth:api');//获取修改简历技能
    Route::match(['post'], 'update', 'ResumeSkillController@update')->middleware('auth:api');//修改简历技能
    Route::match(['post'], 'delete', 'ResumeSkillController@destroy')->middleware('auth:api');//删除简历技能
});

Route::group(['prefix' => 'resume_cer'], function () {//简历证书相关
    Route::match(['post'], 'create', 'ResumeCertificateController@create')->middleware('auth:api');//添加简历证书
    Route::match(['post'], 'edit', 'ResumeCertificateController@edit')->middleware('auth:api');//获取修改简历证书
    Route::match(['post'], 'update', 'ResumeCertificateController@update')->middleware('auth:api');//修改简历证书
    Route::match(['post'], 'delete', 'ResumeCertificateController@destroy')->middleware('auth:api');//删除简历证书
});

Route::group(['prefix' => 'resume_other'], function () {//简历其他相关
    Route::match(['post'], 'create', 'ResumeOtherController@create')->middleware('auth:api');//添加简历其他
    Route::match(['post'], 'edit', 'ResumeOtherController@edit')->middleware('auth:api');//获取修改简历其他
    Route::match(['post'], 'update', 'ResumeOtherController@update')->middleware('auth:api');//修改简历其他
    Route::match(['post'], 'delete', 'ResumeOtherController@destroy')->middleware('auth:api');//删除简历其他
});

Route::group(['prefix' => 'resume_send'], function () {//投递简历相关
    Route::match(['post'], '', 'ResumeSendController@index')->middleware('auth:api');//简历投递列表
    Route::match(['post'], 'create', 'ResumeSendController@create')->middleware('auth:api');//添加简历其他
    Route::match(['post'], 'update', 'ResumeSendController@update');//修改简历状态
    Route::match(['post'], 'unread_send_count', 'ResumeSendController@unreadSendCount')->middleware('auth:com');//简历投递未读个数
});

Route::group(['prefix' => 'resume_receive'], function () {//接收简历相关
    Route::match(['post'], '', 'ResumeSendController@receive')->middleware('auth:com');//简历投递列表
});

Route::group(['prefix' => 'favorites'], function () {//职位收藏
    Route::match(['post'], '', 'FavoriteController@index')->middleware('auth:api');//收藏职位列表
    Route::match(['post'], 'create', 'FavoriteController@create')->middleware('auth:api');//收藏职位
    Route::match(['post'], 'delete', 'FavoriteController@destroy')->middleware('auth:api');//取消收藏
});

Route::group(['prefix' => 'shield'], function () {//公司黑名单
    Route::match(['post'], '', 'ShieldController@index')->middleware('auth:api');//简历公司黑名单
    Route::match(['post'], 'search', 'ShieldController@search')->middleware('auth:api');//简历公司黑名单
    Route::match(['post'], 'create', 'ShieldController@create')->middleware('auth:api');//添加简历公司黑名单
    Route::match(['post'], 'delete', 'ShieldController@destroy')->middleware('auth:api');//删除简历公司黑名单
});

Route::group(['prefix' => 'interview'], function () {//面试邀请相关
    Route::match(['post'], '', 'InterviewController@index')->middleware('auth:com');//已面试邀请列表
    Route::match(['post'], 'create', 'InterviewController@create')->middleware('auth:com');//发送面试邀请
    Route::match(['post'], 'update', 'InterviewController@update');//修改邀请状态
});

Route::group(['prefix' => 'interview_receive'], function () {//接收简历相关
    Route::match(['post'], '', 'InterviewController@interviewReceive')->middleware('auth:api');//简历投递列表
});

Route::group(['prefix' => 'resume_favorite'], function () {//简历收藏
    Route::match(['post'], '', 'ResumeFavoriteController@index')->middleware('auth:com');//简历收藏列表
    Route::match(['post'], 'create', 'ResumeFavoriteController@create')->middleware('auth:com');//收藏简历
    Route::match(['post'], 'delete', 'ResumeFavoriteController@destroy')->middleware('auth:com');//取消收藏
});

Route::group(['prefix' => 'news'], function () {//资讯
    Route::match(['post'], '', 'NewsController@index');
    Route::match(['post'], 'show', 'NewsController@show');
    Route::match(['post'], 'category', 'NewsController@category');
});

Route::group(['prefix' => 'company_search'], function () {//简历搜索器
    Route::match(['post'], '', 'CompanySearchController@index')->middleware('auth:com');//搜索器列表
    Route::match(['post'], 'create', 'CompanySearchController@create')->middleware('auth:com');//添加
    Route::match(['post'], 'edit', 'CompanySearchController@edit')->middleware('auth:com');//编辑
    Route::match(['post'], 'update', 'CompanySearchController@update')->middleware('auth:com');//更新
    Route::match(['post'], 'delete', 'CompanySearchController@destroy')->middleware('auth:com');//删除
});

Route::group(['prefix' => 'search_engine'], function () {//职位搜索器
    Route::match(['post'], '', 'SearchEngineController@index')->middleware('auth:api');//搜索器列表
    Route::match(['post'], 'create', 'SearchEngineController@create')->middleware('auth:api');//添加
    Route::match(['post'], 'edit', 'SearchEngineController@edit')->middleware('auth:api');//编辑
    Route::match(['post'], 'update', 'SearchEngineController@update')->middleware('auth:api');//更新
    Route::match(['post'], 'delete', 'SearchEngineController@destroy')->middleware('auth:api');//删除
});

Route::group(['prefix' => 'part_job'], function () {//兼职职位
    Route::match(['post'], '', 'PartTimeJobController@index')->middleware('auth:com');//列表
    Route::match(['post'], 'create', 'PartTimeJobController@create')->middleware('auth:com');//添加
    Route::match(['post'], 'edit', 'PartTimeJobController@edit')->middleware('auth:com');//编辑
    Route::match(['post'], 'update', 'PartTimeJobController@update')->middleware('auth:com');//更新
    Route::match(['post'], 'status', 'PartTimeJobController@updateStatus')->middleware('auth:com');//修改状态
    Route::match(['post'], 'search', 'PartTimeJobController@search');//搜索
    Route::match(['post'], 'show', 'PartTimeJobController@show');//详情
    Route::match(['post'], 'refresh', 'PartTimeJobController@refresh')->middleware('auth:com');//刷新兼职职位
});

Route::group(['prefix' => 'part_resume'], function () {//兼职简历
    Route::match(['post'], 'create', 'PartTimeResumeController@create')->middleware('auth:api');//添加
    Route::match(['post'], 'edit', 'PartTimeResumeController@edit')->middleware('auth:api');//编辑
    Route::match(['post'], 'update', 'PartTimeResumeController@update')->middleware('auth:api');//更新
    Route::match(['post'], 'search', 'PartTimeResumeController@search')->middleware('auth:com');//搜索
    Route::match(['post'], 'show', 'PartTimeResumeController@show')->middleware('auth:com');//详情
});

Route::group(['prefix' => 'part_sign_up'], function () {//兼职报名记录
    Route::match(['post'], 'create', 'PartTimeSignUpController@create')->middleware('auth:api');//添加
    Route::match(['post'], '', 'PartTimeSignUpController@index')->middleware('auth:api');//简历投递列表
    Route::match(['post'], 'update', 'PartTimeSignUpController@update');//修改邀请状态
    Route::match(['post'], 'receive', 'PartTimeSignUpController@receive')->middleware('auth:com');//企业查看报名记录
});

Route::group(['prefix' => 'part_sign_process'], function () {//兼职邀请记录
    Route::match(['post'], '', 'PartTimeSignProcessController@index')->middleware('auth:com');//简历投递列表
    Route::match(['post'], 'create', 'PartTimeSignProcessController@create')->middleware('auth:com');//添加
    Route::match(['post'], 'update', 'PartTimeSignProcessController@update');//修改邀请状态
    Route::match(['post'], 'receive', 'PartTimeSignProcessController@receive')->middleware('auth:api');//用户查看邀请记录
});

Route::group(['prefix' => 'chat'], function () {//聊天
    Route::match(['post'], 'send_first_chat_sms', 'ChatController@sendFirstChatSms');//简历投递列表
});